package com.qf.controller;


import com.qf.bean.AjaxMessage;
import com.qf.entity.Form;
import com.qf.service.IFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lcx
 * @since 2020-09-03
 */
@RestController
@RequestMapping("/form")
public class FormController {
    @Autowired
    IFormService formService;

    @RequestMapping("/select")
    public AjaxMessage selectForm(){
        List<Form> forms = formService.list();
        if (forms != null && forms.size() != 0){
            return new AjaxMessage(0,"",forms);
        }
        return new AjaxMessage(1,"查询失败");
    }
}
